<?php
$dsn = 'mysql:dbname=mall;host=localhost;port=3306';
$username = "jing";
$password = "123456";

try {
    $conn = new PDO($dsn, $username, $password, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
    if ($conn) {
        // echo "连接成功"; 
    }
    
}
catch(PDOException $e)
{
    echo $e->getMessage();
}

// $conn = null; 
?>
